﻿using CleanArchitecture.Infrastructure.Entities;
using CleanArchitecture.Infrastructure.ModelBinding;
using System.ComponentModel;

namespace CleanArchitecture.Infrastructure.Models.AdminUsers
{
    /// <summary>
    /// Represents a news item model
    /// </summary>
    public partial class AdminRoleModel : BaseEntityModel
    {
        #region Ctor

        public AdminRoleModel()
        {//初始化赋值
            IsAdmin = EntityEnumConfig.YesorNo.No;
            IsActive = EntityEnumConfig.YesorNo.YES;
        }

        #endregion

        #region Fields
        /// <summary>
        /// 用户角色名称
        /// </summary>
        [DisplayName("角色名称")]
        [NoTrim]
        public string RoleName { get; set; }

        /// <summary>
        /// 角色所属机构组织名称
        /// </summary>
        public int FKOrganizeId { get; set; }
        [DisplayName("所属组织机构")]
        public string OranizeName { get; set; }
        [DisplayName("状态")]
        public EntityEnumConfig.YesorNo IsActive { get; set; }
        [DisplayName("是否系统管理员")]
        /// <summary>
        /// 角色是否是超级管理员，超级管理员有绝对权限，无需验证角色对应模块判定授权状态
        /// </summary>
        public EntityEnumConfig.YesorNo IsAdmin { get; set; }
        [DisplayName("排序")]
        public int DisplayOrder { get; set; }
        #endregion
    }
}
